package com.security.spring.web.rq;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * @author Administrator
 */
public class GetTokenMessageDTO implements Serializable {
    private static final long serialVersionUID = -7087072793680199652L;

    @JsonProperty("grant_type")
    private String grantType;

    /**
     * ===========================grant_type:wechat_authorization_code/apple_authorization_code必传==============================
     */
    @JsonProperty("app_id")
    private String appId;

    @JsonProperty("secret")
    private String secret;

    @JsonProperty("code")
    private String code;

    /**
     * =========================grant_type:SMS必传==========================
     */
    @JsonProperty("mobile")
    private String mobile;

    /**
     * ==========================grant_type:PASSWORD必传==========================
     */
    @JsonProperty("username")
    private String username;

    @JsonProperty("password")
    private String password;

    public GetTokenMessageDTO(String grantType, String appId, String secret, String code, String mobile, String username, String password) {
        this.grantType = grantType;
        this.appId = appId;
        this.secret = secret;
        this.code = code;
        this.mobile = mobile;
        this.username = username;
        this.password = password;
    }

    public GetTokenMessageDTO() {

    }

    @Override
    public String toString() {
        return "GetTokenMessageDTO{" +
                "grantType='" + grantType + '\'' +
                ", appId='" + appId + '\'' +
                ", secret='" + secret + '\'' +
                ", code='" + code + '\'' +
                ", mobile='" + mobile + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public String getGrantType() {
        return grantType;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
